package com.ihealthway.all.groupbuy.modules.admin;

import com.ihealthway.all.groupbuy.services.UserInfoService;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;

import java.util.Map;

/**
 * Users module class
 * @author 凡梦星尘(elkan1788@gmail.com)
 */
@IocBean
@At("/admin/users")
public class UsersModule {

    private static final Log logger = Logs.get();

    @Inject
    private UserInfoService userInfoService;

    @At
    @Ok("beetl:admin/users.jsp")
    public void index() {

    }

    @At
    public Map<String, Object> dataList(@Param("rows")int rows, @Param("page") int page, @Param("userName") String userName) {
        return userInfoService.getDataList(rows, page, userName);
    }
}
